<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="第二遍.js"></script>
</head>

<body>

<script>
    var music = [];
    for (var i = 0; i < 5; i++) {
        music.push("歌曲" + i);
    }

    var html = $$.map(music, function (v, i) {
        return "<input type='checkbox'>" + v + "<br>";
    }).join("");
    document.body.innerHTML = html;
    var btn = ["全选", "全不选", "反选"];
    document.body.innerHTML += $$.map(btn, function (v, i) {
        return "<button id=ID" + i + ">" + v + "</button>"
    }).join("");
    new $$("#ID0")[0].onclick = function () {
        alert(1);
        console.log(1);
    }

    function toString(ele) {
        return Object.prototype.toString(ele);
    }

    toString.call([1]);  //[object Array]
    [1].toString();      //1


    console.log(toLocaleString.apply([1, 3]));

    console.log({}.toString.call([1]));
    console.log(Object.prototype.toString.call([1]));
    console.log([1].toString());
    console.log(typeof toString);
</script>
</body>
</html>